package com.zs.blog.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @Title: Role
 * @Author zs
 * @Package com.zs.blog.model.entity
 * @Date 2024/10/11 23:48
 * @description: 角色表
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("um_role")
public class Role {
    @Schema(description = "角色ID")
    @TableId(type = IdType.AUTO)
    public Long id;

    @Schema(description = "角色名称")
    public String roleName;

    @Schema(description = "角色编码")
    public String roleCode;

    @Schema(description = "是否禁用[0:启用，1:禁用 ]")
    public Integer isDisabled;

    @Schema(description = "是否删除[0:否,1:是]")
    public Integer isDeleted;

    @Schema(description = "创建时间")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd hh-mm-ss", shape = JsonFormat.Shape.STRING)
    public LocalDateTime createTime;

    @Schema(description = "更新时间")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd hh-mm-ss", shape = JsonFormat.Shape.STRING)
    public LocalDateTime updateTime;
}
